﻿using LBSoft.Common.DotNetConfig;
using LBSoft.DataBase;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LBSoft.Business
{
    public class DataFactory
    {
        public static IDbNewHelper SqlNewDataBase()
        {
            return new BaseDAL();
        }

        public static IDbNewHelper SqlNewDataBase(string connectstring)
        {
            return new BaseDAL(ConfigHelper.GetAppSettings(connectstring));
        }

        public static IDbHelper SqlDataBase()
        {
            return new SqlServerHelper(ConfigHelper.GetAppSettings("SqlServer_DB"));
        }

        public static IDbHelper SqlDataBase(string connectstring)
        {
            return new SqlServerHelper(ConfigHelper.GetAppSettings(connectstring));
        }
    }
}
